package org.alex.fileSystem.service.impl;

import lombok.RequiredArgsConstructor;
import org.alex.fileSystem.service.FileService;
import org.alex.fileSystem.utils.MinioUtil;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author : alex
 */
@Service
@RequiredArgsConstructor
public class FileServiceImpl implements FileService {
    private final MinioUtil minioUtil;
    @Override
    public String upload(MultipartFile file, String objectName) {
        return minioUtil.upload(file, objectName);
    }

    @Override
    public String preview(String objectName) {
        return minioUtil.preview(objectName);
    }
}
